package ray.mgocc.title;

public class Pigeon extends WeekTitle{
    public String getName(){ return "PIGEON";}
    public int getPriority(){ return 6;}
    public int getPlayTimeThreshold(){ return 3;}
    public void init(){
        super.init();
        add(new StunRequirement());
    }
    class StunRequirement extends Requirement{
        public String getName(){ return "stun"; }
        public double getStunRatio(){
            int stun = getValue("Total.ALL.STUNS");
            int kill = getValue("Total.ALL.KILLS");
            return ((double)kill)/stun;
        }
        private double getThreshold(){
            return 0.5;
        }
        public double getRatio(){
            return getThreshold()/getStunRatio();
        }
        public String toString(){
            return super.toString()+"("+getThreshold()+">"+format(getStunRatio())+")";
        }
    }
}

